/*
*  Copyright 2019-2020 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package me.zhengjie.business.domain;

import lombok.Data;
import cn.hutool.core.bean.BeanUtil;
import io.swagger.annotations.ApiModelProperty;
import cn.hutool.core.bean.copier.CopyOptions;
import me.zhengjie.base.BaseBusiness;
import org.hibernate.annotations.GenericGenerator;
import javax.persistence.*;
import javax.validation.constraints.*;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.io.Serializable;
import java.util.Objects;

/**
* @website https://el-admin.vip
* @description /
* @author xiahongbo
* @date 2022-04-15
**/
@Entity
@Data
@Table(name="BIS_YMKDZ")
public class Ymkdz extends BaseBusiness implements Serializable {

    @Id
    @GenericGenerator(name = "hibernate-uuid", strategy = "uuid")
    @GeneratedValue(generator = "hibernate-uuid")
    @Column(name = "BIS_YMKDZ_ID")
    @ApiModelProperty(value = "异名库对照ID")
    private String bisYmkdzId;

    @Column(name = "BIS_YMKDZ_YMK_ID")
    @ApiModelProperty(value = "异名库ID")
    private String bisYmkdzYmkId;

    @OneToOne
    @JoinColumn(name = "BIS_YMKDZ_HLJG_ID")
    @ApiModelProperty(value = "护理机构ID")
    private Hljg hljg;

    @Column(name = "BIS_YMKDZ_MC")
    @ApiModelProperty(value = "名称")
    private String bisYmkdzMc;

    @Column(name = "BIS_YMKDZ_ZJM")
    @ApiModelProperty(value = "助记码")
    private String bisYmkdzZjm;

    @Column(name = "BIS_YMKDZ_DJ")
    @ApiModelProperty(value = "单价")
    private BigDecimal bisYmkdzDj;

    @Column(name = "BIS_YMKDZ_FWSC")
    @ApiModelProperty(value = "服务时长")
    private String bisYmkdzFwsc;

    @Column(name = "BIS_YMKDZ_XMLB")
    @ApiModelProperty(value = "项目类别")
    private String bisYmkdzXmlb;

    @Column(name = "BIS_YMKDZ_YBBM")
    @ApiModelProperty(value = "医保编码")
    private String bisYmkdzYbbm;

    @Column(name = "BIS_YMKDZ_YBMC")
    @ApiModelProperty(value = "医保名称")
    private String bisYmkdzYbmc;

    @Column(name = "BIS_YMKDZ_YBZJM")
    @ApiModelProperty(value = "医保助记码")
    private String bisYmkdzYbzjm;

    @Column(name = "BIS_YMKDZ_YBFWSC")
    @ApiModelProperty(value = "医保服务时长")
    private String bisYmkdzYbfwsc;

    @Column(name = "BIS_YMKDZ_YBDJ")
    @ApiModelProperty(value = "医保价格")
    private BigDecimal bisYmkdzYbdj;

    @Column(name = "BIS_YMKDZ_JSLX")
    @ApiModelProperty(value = "结算类型 1甲类 3丙类")
    private String bisYmkdzJslx;

    @Column(name = "BIS_YMKDZ_FWLX")
    @ApiModelProperty(value = "类型  91复核 94生活护理 95  医疗护理")
    private String bisYmkdzFwlx;


    @Column(name = "BIS_YMKDZ_ZXTS")
    @ApiModelProperty(value = "执行天数")
    private Long bisYmkdzZxts;

    @Column(name = "BIS_YMKDZ_JX")
    @ApiModelProperty(value = "剂型")
    private String bisYmkdzJx;

    @Column(name = "BIS_YMKDZ_JL")
    @ApiModelProperty(value = "剂量")
    private BigDecimal bisYmkdzJl;

    @Column(name = "BIS_YMKDZ_YF")
    @ApiModelProperty(value = "用法")
    private String bisYmkdzYf;

    @Column(name = "BIS_YMKDZ_YL")
    @ApiModelProperty(value = "用量")
    private BigDecimal bisYmkdzYl;

    @Column(name = "BIS_YMKDZ_SYPC")
    @ApiModelProperty(value = "使用频次")
    private String bisYmkdzSypc;

    @Column(name = "BIS_YMKDZ_DW")
    @ApiModelProperty(value = "单位")
    private String bisYmkdzDw;

    @Column(name = "BIS_YMKDZ_GG")
    @ApiModelProperty(value = "规格")
    private String bisYmkdzGg;

    public void copy(Ymkdz source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }

    @Override
    public int hashCode() {
        return Objects.hash(bisYmkdzId, bisYmkdzMc);
    }
}